package com.ruoyi.tkType.service.impl;

import java.util.List;

import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tkType.mapper.QtTkTypeMapper;
import com.ruoyi.tkType.domain.QtTkType;
import com.ruoyi.tkType.service.IQtTkTypeService;

/**
 * 题型Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-19
 */
@Service
public class QtTkTypeServiceImpl implements IQtTkTypeService 
{
    @Autowired
    private QtTkTypeMapper qtTkTypeMapper;

    /**
     * 查询题型
     * 
     * @param tkTypeId 题型主键
     * @return 题型
     */
    @Override
    public QtTkType selectQtTkTypeByTkTypeId(String tkTypeId)
    {
        return qtTkTypeMapper.selectQtTkTypeByTkTypeId(tkTypeId);
    }

    /**
     * 查询题型列表
     * 
     * @param qtTkType 题型
     * @return 题型
     */
    @Override
    public List<QtTkType> selectQtTkTypeList(QtTkType qtTkType)
    {
        return qtTkTypeMapper.selectQtTkTypeList(qtTkType);
    }

    /**
     * 新增题型
     * 
     * @param qtTkType 题型
     * @return 结果
     */
    @Override
    public int insertQtTkType(QtTkType qtTkType)
    {
        qtTkType.setTkTypeId(IdUtils.randomUUID());
        return qtTkTypeMapper.insertQtTkType(qtTkType);
    }

    /**
     * 修改题型
     * 
     * @param qtTkType 题型
     * @return 结果
     */
    @Override
    public int updateQtTkType(QtTkType qtTkType)
    {
        return qtTkTypeMapper.updateQtTkType(qtTkType);
    }

    /**
     * 批量删除题型
     * 
     * @param tkTypeIds 需要删除的题型主键
     * @return 结果
     */
    @Override
    public int deleteQtTkTypeByTkTypeIds(String[] tkTypeIds)
    {
        return qtTkTypeMapper.deleteQtTkTypeByTkTypeIds(tkTypeIds);
    }

    /**
     * 删除题型信息
     * 
     * @param tkTypeId 题型主键
     * @return 结果
     */
    @Override
    public int deleteQtTkTypeByTkTypeId(String tkTypeId)
    {
        return qtTkTypeMapper.deleteQtTkTypeByTkTypeId(tkTypeId);
    }
}
